import 'package:equatable/equatable.dart';
import 'package:website.core/core/domain/entities/google_play/google_play_purchased_item.dart';
import 'package:website.core/core/domain/entities/google_play/google_play_purchased_subscription_pause_info.dart';
import 'package:website.core/core/domain/entities/google_play/google_play_purchased_subscription_status.dart';
import 'package:website.core/core/domain/entities/purchased_subscription.dart';

class GooglePlayPurchasedSubscription extends Equatable
    implements GooglePlayPurchasedItem, PurchasedSubscription {
  const GooglePlayPurchasedSubscription({
    required this.purchaseItemSku,
    required this.purchaseToken,
    required this.expirationTime,
    required this.autoRenewalEnabled,
    required this.status,
    required this.pauseInfo,
  });

  @override
  final String purchaseItemSku;

  @override
  final String purchaseToken;

  @override
  final DateTime? expirationTime;

  @override
  final bool autoRenewalEnabled;

  final GooglePlayPurchasedSubscriptionStatus status;
  final GooglePlayPurchasedSubscriptionPauseInfo? pauseInfo;

  @override
  List<Object?> get props {
    return [
      purchaseItemSku,
      purchaseToken,
      expirationTime,
      autoRenewalEnabled,
      status,
      pauseInfo,
    ];
  }
}
